package com.t249.bdqn.renting.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.t249.bdqn.renting.entity.RetMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
@Mapper
public interface RetMessageDao extends BaseMapper<RetMessage> {

    @Select("SELECT * FROM `ret_message` m,`ret_rental_information` r,`ret_huxing` h WHERE r.`ret_id` = m.`rental_id` AND r.`huxing_Id` = h.`id` AND m.user_id = #{userId}")
    public List<Map<String,Object>> chaxun(String userId);
}
